<!-- 供应商附件列表 -->
<template>
  <div class="base-info">
    <TableTurn ref="tableRef" :tableData="getSupplierAccessories" :args="args">
      <a-table-column align="center" :width="80">
        <template #title> 序号 </template>
        <template #cell="{ rowIndex }">
          {{ rowIndex + 1 }}
        </template>
      </a-table-column>
      <a-table-column title="附件描述" dataIndex="des" align="center">
      </a-table-column>
      <a-table-column title="附件名称" dataIndex="name" align="center">
      </a-table-column>

      <a-table-column title="创建时间" dataIndex="createdAt" align="center">
        <template #cell="{ record }">
          {{ dayjs(record.createdAt).format('YY - MM - DD HH：mm') }}
        </template>
      </a-table-column>
    </TableTurn>
  </div>
</template>

<script lang="ts" setup>
  import { reactive } from 'vue';
  import { useRoute } from 'vue-router';
  import { GetArchivesDetaliType } from '@/api/buy-management/archives-details/index';
  import dayjs from 'dayjs';

  const route = useRoute();
  const getSupplierAccessories = async () => {
    try {
      const res = await GetArchivesDetaliType({
        id: Math.floor(route.query.id),
        typeId: 11,
      });
      return res;
    } catch (err: unknown) {
      console.log(err);
    }
  };
  getSupplierAccessories();
</script>

<style scoped lang="less">
  .base-info {
    padding: 0 40px;
  }
</style>
